package com.mall.mapper;

import com.mall.entity.MallCarousel;
import org.mapstruct.Mapper;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;

@Repository
@Mapper
public interface MallCarouselMapper {
    MallCarousel getMallCarouselById(String carouselId);
    ArrayList<MallCarousel> getAllList();

    /**
     * 获取没有逻辑删除的轮播图
     * @return
     */
    ArrayList<MallCarousel> getList();

    /**
     * 直接删除数据
     * @param carouselId
     * @return
     */
    int deleteMallCarouselById(String carouselId);
    int addMallCarousel(MallCarousel mallCarousel);

    /**
     * 修改轮播图数据或者逻辑删除轮播图数据
     * @param mallCarousel
     * @return
     */
    int updateMallCarousel(MallCarousel mallCarousel);

    /**
     * 根据多条Id逻辑删除（更新）轮播图数据
     * @param listCarouselId
     * @return
     */
    int updateListMallCarouselById(ArrayList<String> listCarouselId);
}
